﻿Public Class Poliseis

    Private Sub PoliseisBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PoliseisBindingNavigatorSaveItem.Click
        If (ID_PelatiTextBox.Text = "") Then
            Me.ErrorProvider1.SetError(ID_PelatiTextBox, "Πρέπει να δώσεις ID Πελάτη")
        Else
            Me.Validate()
            Me.PoliseisBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.PanalogDataSet)
        End If
    End Sub

    Private Sub Poliseis_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        eisagogi.Visible = False
        Label2.Visible = False
        Label1.Visible = False

        posotitaTextBox.Visible = False
        PerigrafiComboBox.Visible = False
        'TODO: This line of code loads data into the 'PanalogDataSet.Proionta' table. You can move, or remove it, as needed.
        Me.ProiontaTableAdapter.Fill(Me.PanalogDataSet.Proionta)
        'TODO: This line of code loads data into the 'PanalogDataSet.Prointa_Polisis' table. You can move, or remove it, as needed.
        Me.Prointa_PolisisTableAdapter.Fill(Me.PanalogDataSet.Prointa_Polisis)
        'TODO: This line of code loads data into the 'PanalogDataSet.Poliseis' table. You can move, or remove it, as needed.
        Me.PoliseisTableAdapter.Fill(Me.PanalogDataSet.Poliseis)

    End Sub

    Private Sub proiontaPolisis_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles proiontaPolisis.Click
        GroupBox1.Visible = True
        Me.Prointa_PolisisTableAdapter.FillProiontaPolisis(Me.PanalogDataSet.Prointa_Polisis, IDTextBox.Text)
    End Sub

    Private Sub BindingNavigatorMoveNextItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorMoveNextItem.Click
        GroupBox1.Visible = False
    End Sub

    Private Sub BindingNavigatorMovePreviousItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorMovePreviousItem.Click
        GroupBox1.Visible = False
    End Sub

    Private Sub BindingNavigatorMoveFirstItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorMoveFirstItem.Click
        GroupBox1.Visible = False
    End Sub

    Private Sub BindingNavigatorMoveLastItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorMoveLastItem.Click
        GroupBox1.Visible = False
    End Sub

    Private Sub BindingNavigatorAddNewItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem.Click
        GroupBox1.Visible = False
        eisagogi.Visible = True
        ektuposiPoliseon.Visible = False
        IDTextBox.Visible = False
        PerigrafiComboBox.Visible = True
        posotitaTextBox.Visible = True
        Label2.Visible = True
        Label1.Visible = True
        proiontaPolisis.Visible = False
    End Sub
End Class